#================================================================
#	This Makefile creates a documentation for cgal modules.
#===============================================================
Package = CGAL
Cgal_package = cgal_package
Kernel_module = $(Package).Kernel
Exact_Kernel_module = $(Package).Exact_Kernel
Triangulation_2_module = $(Package).Triangulations_2
Triangulation_3_module = $(Package).Triangulations_3
Convex_hull_2_module = $(Package).Convex_hull_2
Geometric_Optimisation_module = $(Package).Geometric_Optimisation
Polyhedron_module = $(Package).Polyhedron
Mesh_2_module = $(Package).Mesh_2
Alpha_shapes_2_module = $(Package).Alpha_shapes_2
Alpha_shapes_3_module = $(Package).Alpha_shapes_3

all:
	@(cd .. && $(MAKE) package)
	@mkdir $(Package)
	@cp  ../$(Cgal_package)/$(Package)/*.so ../$(Cgal_package)/$(Package)/*.py   $(Package)
	@cp  ../$(Cgal_package)/*.py   .
	@./pydoc.py -w $(Package) $(Kernel_module) $(Exact_Kernel_module) $(Triangulation_2_module) $(Triangulation_3_module)\
	$(Convex_hull_2_module) $(Geometric_Optimisation_module) $(Polyhedron_module)\
	$(Mesh_2_module) $(Alpha_shapes_2_module) $(Alpha_shapes_3_module)
	@rm -r $(Package) __init__.py	

clean:
	@rm -f *.html *~
	@rm -rf $(Package)